package com.yn.common.utils;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;

/**
 * @ClassName: BeanUtils
 * @Description:
 * @Author: lxp
 * @Date: 2025/5/6 17:03
 **/
public class BeanUtils {
    public static <T, F> F copyProperties(T t, Class<F> clazz) {
        String jsonStr = JSON.toJSONString(t, SerializerFeature.DisableCircularReferenceDetect);
        return JSON.parseObject(jsonStr, clazz);
    }
}
